﻿@if (Model.Information.Any() || Model.ProductionGroups.Any() || Model.Publishers.Any() || Model.Tags.Any())
{
    <section id="information">
        @if (Model.InforState == EditState.Preview)
        {
            <CnGalWebSite.Shared.MasaComponent.Shared.Editors.Buttons.RevokeButton Url="@("/entries/EditAddInfor/" + Model.Id)" ExamineType="Operation.EstablishAddInfor" OnClickRevoke="OnRevoke" Class="m-0" />
        }

        <h2>基本信息</h2>
        <dl class="detail">
            @if (Model.ProductionGroups.Any())
            {
                <div>
                    <dt>制作组</dt>
                    @foreach (var item in Model.ProductionGroups)
                    {
                        <dd>
                            <a href="@(item.Id>0?$"/entries/index/{item.Id}":null)">
                                @item.DisplayName
                            </a>
                        </dd>
                    }
                </div>
            }
            @if (Model.Publishers.Any())
            {
                <div>
                    <dt>发行商</dt>
                    @foreach (var item in Model.Publishers)
                    {
                        <dd>
                            <a href="@(item.Id>0?$"/entries/index/{item.Id}":null)">
                                @item.DisplayName
                            </a>
                        </dd>
                    }
                </div>
            }
            @if (Model.Information.Any())
            {
                @foreach (var item in Model.Information)
                {
                    <div>
                        <dt>@item.Name</dt>
                        <dd>@item.Value</dd>
                    </div>
                }
            }
            @if (Model.Tags.Any())
            {
                <div>
                    <dt>标签</dt>
                    @foreach (var item in Model.Tags)
                    {
                        <dd>
                            <a href="@($"/tags/index/{item.Id}")">
                                @item.Name
                            </a>
                        </dd>
                    }
                </div>
            }
        </dl>
    </section>
}



@code {
    [Parameter]
    public EntryIndexViewModel Model { get; set; }
    [Parameter]
    public EventCallback<Operation> OnRevoke { get; set; }

}
